﻿using System.Xml;
using System.Xml.Linq;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using XnaXaml.Xaml;

namespace XnaXaml.Pipeline
{
    [ContentTypeWriter]
    class XamlSourceWriter : ContentTypeWriter<XDocument>
    {
        protected override void Write(ContentWriter output, XDocument value)
        {
            value.Save(output.BaseStream);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(XamlDocumentReader).AssemblyQualifiedName;
        }
    }
}
